<template>
    <div>
        <div ref="searchPart">
            <slot name="search"></slot>
        </div>
        <div>
            <slot name="table" v-bind:th="wh"></slot>
        </div>
    </div>

    <!--<search-table-layout>-->
        <!--<template v-slot:search>-->
        <!--</template>-->
        <!--<template v-slot:table="slotProps">-->
        <!--</template>-->
    <!--</search-table-layout>-->
</template>

<script>
    export default {
        name: "search-table-layout",
        data(){
            return{
                searchPart:null
            }
        },
        computed: {
            user() {
                return this.$store.state.user;
            },

            wh() {
                // console.log(111111)
                // console.log(this.searchPart)
                let hei = 40;
                if (this.searchPart) {
                    hei = this.searchPart.offsetHeight;
                    console.log(this.searchPart.offsetHeight);
                }
                return this.$store.state.ws.wh - 166 - 28 - 16 - hei  //(105 24 32 28 10)
            },
        },
        mounted() {
            // console.log("mounted");
            // console.log(this.$refs.searchPart);
            this.searchPart = this.$refs.searchPart
        }
    }
</script>

<style scoped>

</style>
